1. Field of the Invention
The present invention relates to a micro-controller, and more particularly, to a micro-controller which compresses instruction codes and stores the compressed instruction codes in a program memory.
2. Description of the Related Art
A micro-controller is a device which is incorporated in an electric device such as electric appliances, audio-visual (AV) devices, portable telephones, cars and the like to control the device associated therewith by executing processes in accordance with programs stored in a built-in read only program memory (ROM).
The micro-controller is required to provide performance necessary to control an associated device and to be inexpensive, from the nature of the micro-controller that is incorporated in a device for utilization.
In recent years, however, processes executed by the micro-controller have become increasingly complicated, with an increased capacity of a program memory required for the processes. For this reason, the program memory accounts for an increasingly higher proportion in the micro-controller, and this trend is thought to remain unchanged in the future. Generally, since an increased capacity of the program memory results in a correspondingly higher cost, it is a critical problem to limit the capacity of the program memory for providing an inexpensive micro-controller.
For general-purpose information processing apparatuses such as personal computers, workstations and the like, techniques for compressing instruction codes have been proposed and brought into practical use for reducing the capacity of program memories.
The compression techniques proposed for general-purpose information processing apparatuses, however, are not always suitable for applications in built-in devices such as a micro-controller without modification because these techniques are implemented, for example, on the assumption that a cache has a relatively high hit rate, for purposes of improving the throughput of instructions, and the like. Specifically, built-in devices such as a micro-controller generally present cache hit rates not so high, and require a high responsibility to interrupts. Also, the built-in devices often regard the latency more important than the throughput of instructions. Further, the built-in devices are characterized by a high proportion of instruction codes (instruction codes in a narrow sense excluding read data) included in programs. Therefore, what is important for the built-in devices is to expand compressed codes to instruction codes faster than general-purpose information processing apparatuses.